<!-- 搜索 半成品 -->
<template>
  <div class="BaseTableSearch">
    <el-input
      v-model="search"
      class="search"
      placeholder="请输入关键词进行搜索"
    >
      <svg-icon slot="prefix" icon-class="sousuo" class-name="search-icon" />
    </el-input>
    <div class="btn-area">
      <div class="re">
        <svg-icon slot="prefix" icon-class="shuaxin" class-name="reicon" />
      </div>
      <el-button
        class="head-btn"
        round
        type="primary"
        @click="setCreateState"
      >创建</el-button>
    </div>
  </div>
</template>

<script>

export default {
  name: 'BaseTableSearch',
  // import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // 这里存放数据
    return {

    }
  },
  // 监听属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 生命周期 - 创建完成（可以访问当前this实例）
  async created() {

  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {

  },
  // 生命周期 - keep-alive
  async activated() {

  },
  // 方法集合
  methods: {
    setCreateState() {

    }
  },
  // 进入页面前
  beforeRouteEnter(to, from, next) {
    next(vm => {

    })
  },
  // 离开页面前
  beforeRouteLeave(to, from, next) {
    next()
  }
}
</script>
<style lang="scss" scoped>
// &__head {
//     display: flex;
//     justify-content: space-between;

    ::v-deep .el-input__inner {
      width: 50%;
      height: 40px;
      background: #fafafa;
      border-radius: 20px;
      border: 0;
      padding-left: 80px;
    }

    ::v-deep .el-input__prefix {
      display: flex;
      align-items: center;
    }

    .search-icon {
      margin-left: 31px;
    }

    .btn-area {
      display: flex;
      align-items: center;
      .re {
        width: 70px;
        height: 38px;
        background: #f9f9ff;
        border-radius: 19px;
        margin-right: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        .reicon {
          width: 16px;
          height: 16px;
        }
      }
    }

    .head-btn {
      @include SecondButton();
    }
  // }
</style>
